package com.ssy.lingxi.marketing.api.model.constant;

import java.util.Arrays;

/**
 /**
 * 活动执行记录类型
 * @author ds
 * @date 2021/6/18
 * @version 2.0.0
 */
public enum ActivityRecordTypeEnum {
    ORDER(1, "订单"),
    REFUND(2, "退货申请单"),
    ;

    private final Integer code;
    private final String message;

    ActivityRecordTypeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static ActivityRecordTypeEnum find(Integer code) {
        return Arrays.stream(ActivityRecordTypeEnum.values()).filter(e -> e.getCode().equals(code)).findFirst().orElse(null);
    }

}
